package ysc.cqnu.operdb.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.entity.Tailor;
import ysc.cqnu.operdb.mapper.CaiJianMapper;
import ysc.cqnu.operdb.service.EnterCaiJianInfoViewDetailsService;

@Service
public class EnterCaiJianInfoViewDetailsServiceImpl implements EnterCaiJianInfoViewDetailsService {
    @Autowired
    private ResultData resultData;
    @Autowired
    private CaiJianMapper caiJianMapper;
    @Autowired
    private Tailor tailor;
    @Override
    public ResultData enterCaiJianInfoViewDetails(String id) {
        try {
            tailor = caiJianMapper.caijiandetails(id);
            resultData.flag="enterCaijianInfoViewDetailsSuccess";
            resultData.data=tailor;
            return resultData;
        }
        catch (Exception e){
            resultData.flag="enterCaijianInfoViewDetailsFail";
            resultData.data=null;
            return resultData;
        }
    }
}
